import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/',
        name: 'page',
        component: () => import('../views/page.vue')
      },
      {
        path: '/commodity',
        name: 'commodity',
        component: () => import('../views/commodity.vue')
      },
      {
        path: '/About',
        name: 'About',
        component: () => import('../views/About.vue')
      },
      {
        path: '/cart',
        name: 'cart',
        component: () => import('../views/cart.vue')
      },
    ],

  },

]

const router = new VueRouter({
  routes
})

export default router
